<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>实例9</title>
    <style>
        *{
            margin: auto;
            text-align: center;
        }
        .textColor {
            font-weight: bold;
        }
        .textSize {
            font-size: 30px;
        }
    </style>
</head>
<body>
<div id="app">
    <img v-bind:src="imageSrc">
    <div v-bind:class="[classA, classB]">类名作为一个属性值保存</div>
    <div v-bind:class="[isA?classA: classB]">三目运算符</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            imageSrc: "../image/lk_logo01.jpg",
            classA: 'textColor',
            classB: 'textSize',
            isA: false
        }
    })
</script>
</body>
</html>